package middleware

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"time"
)

func Runtime() gin.HandlerFunc {
	return func(c *gin.Context) {
		start := time.Now().UnixMilli()
		c.Next()
		end := time.Now().UnixMilli()
		fmt.Printf("代码运行时间%d\n", end-start)
	}
}
